<?php echo $header; ?><?php echo $column_left; ?>
<div id="content">
  <div class="page-header">
    <div class="container-fluid">
      <div class="pull-right">
        <button type="submit" form="form-blog-setting" data-toggle="tooltip" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>
      </div>
      <h1><?php echo $heading_title; ?></h1>
      <ul class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
        <?php } ?>
      </ul>
    </div>
  </div>
  <div class="container-fluid">
    <?php if ($error_warning) { ?>
    <div class="alert alert-danger"><i class="fa fa-exclamation-circle"></i> <?php echo $error_warning; ?>
      <button type="button" class="close" data-dismiss="alert">&times;</button>
    </div>
    <?php } ?>
    <?php if ($text_success) { ?>
    <div class="alert alert-success"><i class="fa fa-exclamation-circle"></i> <?php echo $text_success; ?>
      <button type="button" class="close" data-dismiss="alert">&times;</button>
    </div>
    <?php } ?>
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title"><i class="fa fa-pencil"></i> <?php echo $text_edit; ?></h3>
      </div>
      <div class="panel-body">
        <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form-blog-setting" class="form-horizontal">
          <fieldset>
            <legend><?php echo $text_general; ?></legend>
            <div class="form-group">
              <label class="col-sm-2 control-label" for="input-status"><?php echo $entry_status; ?></label>
              <div class="col-sm-10">
                <select name="blog_status" id="input-status" class="form-control">
                  <?php if ($blog_status) { ?>
                  <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
                  <option value="0"><?php echo $text_disabled; ?></option>
                  <?php } else { ?>
                  <option value="1"><?php echo $text_enabled; ?></option>
                  <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
                  <?php } ?>
                </select>
              </div>
            </div>
            <div class="form-group required">
              <label class="col-sm-2 control-label" for="input-blog-menu-name"><span data-toggle="tooltip" title="<?php echo $help_menu_name; ?>"><?php echo $entry_menu_name; ?></span></label>
              <div class="col-sm-10">
                <?php foreach ($languages as $language) { ?>
                <div class="input-group"><span class="input-group-addon"><img src="language/<?php echo $language['code']; ?>/<?php echo $language['code']; ?>.png" title="<?php echo $language['name']; ?>" /></span>
                  <input type="text" name="blog_menu_name[<?php echo $language['language_id']; ?>]" value="<?php echo isset($blog_menu_name[$language['language_id']]) ? $blog_menu_name[$language['language_id']] : ''; ?>" placeholder="<?php echo $entry_menu_name; ?>" class="form-control" />
                </div>
                <?php if (isset($error_menu_name[$language['language_id']])) { ?>
                <div class="text-danger"><?php echo $error_menu_name[$language['language_id']]; ?></div>
                <?php } ?>
                <?php } ?>
              </div>
            </div>
            <div class="form-group required">
              <label class="col-sm-2 control-label" for="input-default-author"><span data-toggle="tooltip" title="<?php echo $help_default_author; ?>"><?php echo $entry_default_author; ?></span></label>
              <div class="col-sm-10">
                <?php foreach ($languages as $language) { ?>
                <div class="input-group"><span class="input-group-addon"><img src="language/<?php echo $language['code']; ?>/<?php echo $language['code']; ?>.png" title="<?php echo $language['name']; ?>" /></span>
                  <input type="text" name="blog_default_author[<?php echo $language['language_id']; ?>]" value="<?php echo isset($blog_default_author[$language['language_id']]) ? $blog_default_author[$language['language_id']] : ''; ?>" placeholder="<?php echo $entry_default_author; ?>" class="form-control" />
                </div>
                <?php if (isset($error_default_author[$language['language_id']])) { ?>
                <div class="text-danger"><?php echo $error_default_author[$language['language_id']]; ?></div>
                <?php } ?>
                <?php } ?>
              </div>
            </div>
            <div class="form-group required">
              <label class="col-sm-2 control-label" for="input-read-more"><?php echo $entry_post_read_more; ?></label>
              <div class="col-sm-10">
                <?php foreach ($languages as $language) { ?>
                <div class="input-group"><span class="input-group-addon"><img src="language/<?php echo $language['code']; ?>/<?php echo $language['code']; ?>.png" title="<?php echo $language['name']; ?>" /></span>
                  <input type="text" name="blog_post_read_more[<?php echo $language['language_id']; ?>]" value="<?php echo isset($blog_post_read_more[$language['language_id']]) ? $blog_post_read_more[$language['language_id']] : ''; ?>" placeholder="<?php echo $entry_post_read_more; ?>" class="form-control" />
                </div>
                <?php if (isset($error_read_more[$language['language_id']])) { ?>
                <div class="text-danger"><?php echo $error_read_more[$language['language_id']]; ?></div>
                <?php } ?>
                <?php } ?>
              </div>
            </div>
          </fieldset>
          <fieldset>
            <legend><?php echo $text_category_listing; ?></legend>
            <div class="form-group required">
              <label class="col-sm-2 control-label" for="input-post-limit"><span data-toggle="tooltip" title="<?php echo $help_post_limit; ?>"><?php echo $entry_post_limit; ?></span></label>
              <div class="col-sm-10">
                <input type="text" name="blog_post_limit" value="<?php echo $blog_post_limit; ?>" placeholder="<?php echo $entry_post_limit; ?>" id="input-post-limit" class="form-control" />
                <?php if ($error_post_limit) { ?>
                <div class="text-danger"><?php echo $error_post_limit; ?></div>
                <?php } ?>
              </div>
            </div>
            <div class="form-group required">
              <label class="col-sm-2 control-label" for="input-image-category-width"><?php echo $entry_image_category; ?></label>
              <div class="col-sm-10">
                <div class="row">
                  <div class="col-sm-6">
                    <input type="text" name="blog_category_image_width" value="<?php echo $blog_category_image_width; ?>" placeholder="<?php echo $entry_width; ?>" id="input-image-category-width" class="form-control" />
                  </div>
                  <div class="col-sm-6">
                    <input type="text" name="blog_category_image_height" value="<?php echo $blog_category_image_height; ?>" placeholder="<?php echo $entry_height; ?>" class="form-control" />
                  </div>
                </div>
                <?php if ($error_image_category) { ?>
                <div class="text-danger"><?php echo $error_image_category; ?></div>
                <?php } ?>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label" for="input-post-image-status"><?php echo $entry_post_image_status; ?></label>
              <div class="col-sm-10">
                <select name="blog_post_image_status" id="input-post-image-status" class="form-control">
                  <?php if ($blog_post_image_status) { ?>
                  <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
                  <option value="0"><?php echo $text_disabled; ?></option>
                  <?php } else { ?>
                  <option value="1"><?php echo $text_enabled; ?></option>
                  <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
                  <?php } ?>
                </select>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label" for="input-post-image-position"><?php echo $entry_post_image_position; ?></label>
              <div class="col-sm-10">
                <select name="blog_post_image_position" id="input-post-image-position" class="form-control">
                  <?php if ($blog_post_image_position == 'top') { ?>
                  <option value="top" selected="selected"><?php echo $text_top; ?></option>
                  <option value="left"><?php echo $text_left; ?></option>
                  <?php } else { ?>
                  <option value="top"><?php echo $text_top; ?></option>
                  <option value="left" selected="selected"><?php echo $text_left; ?></option>
                  <?php } ?>
                </select>
              </div>
            </div>
            <div class="form-group required">
              <label class="col-sm-2 control-label" for="input-image-category-width"><?php echo $entry_image_post; ?></label>
              <div class="col-sm-10">
                <div class="row">
                  <div class="col-sm-6">
                    <input type="text" name="blog_post_image_width" value="<?php echo $blog_post_image_width; ?>" placeholder="<?php echo $entry_width; ?>" id="input-image-post-width" class="form-control" />
                  </div>
                  <div class="col-sm-6">
                    <input type="text" name="blog_post_image_height" value="<?php echo $blog_post_image_height; ?>" placeholder="<?php echo $entry_height; ?>" class="form-control" />
                  </div>
                </div>
                <?php if ($error_image_post) { ?>
                <div class="text-danger"><?php echo $error_image_post; ?></div>
                <?php } ?>
              </div>
            </div>
            <div class="form-group required">
              <label class="col-sm-2 control-label" for="input-post-description-length"><span data-toggle="tooltip" title="<?php echo $help_post_description_length; ?>"><?php echo $entry_post_description_length; ?></span></label>
              <div class="col-sm-10">
                <input type="text" name="blog_post_description_length" value="<?php echo $blog_post_description_length; ?>" placeholder="<?php echo $entry_post_description_length; ?>" id="input-post-description-length" class="form-control" />
                <?php if ($error_post_description_length) { ?>
                <div class="text-danger"><?php echo $error_post_description_length; ?></div>
                <?php } ?>
              </div>
            </div>
          </fieldset>
          <fieldset>
            <legend><?php echo $text_blog_home; ?></legend>
            <ul class="nav nav-tabs" id="language">
              <?php foreach ($languages as $language) { ?>
              <li><a href="#language<?php echo $language['language_id']; ?>" data-toggle="tab"><img src="language/<?php echo $language['code']; ?>/<?php echo $language['code']; ?>.png" title="<?php echo $language['name']; ?>" /> <?php echo $language['name']; ?></a></li>
              <?php } ?>
            </ul>
            <div class="tab-content">
              <?php foreach ($languages as $language) { ?>
              <div class="tab-pane" id="language<?php echo $language['language_id']; ?>">
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-meta-title<?php echo $language['language_id']; ?>"><?php echo $entry_meta_title; ?></label>
                  <div class="col-sm-10">
                    <input type="text" name="blog_meta_title[<?php echo $language['language_id']; ?>]" value="<?php echo isset($blog_meta_title[$language['language_id']]) ? $blog_meta_title[$language['language_id']] : ''; ?>" placeholder="<?php echo $entry_meta_title; ?>" id="input-meta-title<?php echo $language['language_id']; ?>" class="form-control" />
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-meta-description<?php echo $language['language_id']; ?>"><?php echo $entry_meta_description; ?></label>
                  <div class="col-sm-10">
                    <textarea name="blog_meta_description[<?php echo $language['language_id']; ?>]" rows="5" placeholder="<?php echo $entry_meta_description; ?>" id="input-meta-description<?php echo $language['language_id']; ?>" class="form-control"><?php echo isset($blog_meta_description[$language['language_id']]) ? $blog_meta_description[$language['language_id']] : ''; ?></textarea>
                  </div>
                </div>
                <div class="form-group">
                  <label class="col-sm-2 control-label" for="input-meta-keyword<?php echo $language['language_id']; ?>"><?php echo $entry_meta_keyword; ?></label>
                  <div class="col-sm-10">
                    <textarea name="blog_meta_keyword[<?php echo $language['language_id']; ?>]" rows="5" placeholder="<?php echo $entry_meta_keyword; ?>" id="input-meta-keyword<?php echo $language['language_id']; ?>" class="form-control"><?php echo isset($blog_meta_keyword[$language['language_id']]) ? $blog_meta_keyword[$language['language_id']] : ''; ?></textarea>
                  </div>
                </div>
              </div>
              <?php } ?>
            </div>
          </fieldset>
        </form>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript"><!--
$('#language a:first').tab('show');
//--></script>
<?php echo $footer; ?>
